import datetime
import os
import sys

# from GetData import WriteBugNumber
# from Base import SendMessage, GetYamlFile
# from Base import GetYamlFile
import shutil

# sys.path.append("/home/work/GetBugByChanDao/Base")
# sys.path.append("/home/work/GetBugByChanDao/")
# sys.path.append("/home/work/GetBugByChanDao/GetData")
from SendMessage import sendmail


from GetData import WriteBugNumber
from Base import GetYamlFile


def runtest():
    results=WriteBugNumber.WriteResult()
    file_path = GetYamlFile.getBugPath("BugPath")
    today = datetime.datetime.now().strftime('%Y-%m-%d')
    name=today+'BUG统计.xlsx'
    new_path = r'D:\BUG统计\\'+name
    if not os.path.exists("D:\\BUG统计"):
        os.makedirs("D:\\BUG统计")
    path=shutil.copy(file_path,new_path)

    # sendmail(results[0],results[1])
if __name__ == '__main__':
    runtest()
    # print(sys.path)